<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
<div class="layui-form timo-compile">
    <form th:action="@{/manage/source/save}">
        <input type="hidden" name="id" th:if="${source}" th:value="${source.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">渠道名称</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="name" placeholder="请输入渠道名称"
                       th:value="${source?.name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">信用代码</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="companyNum" placeholder="请输入信用代码"
                       th:value="${source?.companyNum}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">渠道KEY</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" readonly=true name="sourceKey" placeholder="请输入渠道KEY"
                       th:value="${source?.sourceKey}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密钥KEY</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" readonly=true name="secretKey" placeholder="请输入密钥KEY"
                       th:value="${source?.secretKey}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">管理员手机号</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="phone" placeholder="管理员手机号"
                       th:value="${source?.phone}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="password" placeholder="密码"
                       th:value="${source?.password}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">地址</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="address" placeholder="请输入地址"
                       th:value="${source?.address}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">区域代码</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="area_code" placeholder="请输入区域代码"
                       th:value="${source?.area_code}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">开户行</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="deposit_bank" placeholder="请输入开户行"
                       th:value="${source?.deposit_bank}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">折扣比例</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="discount" placeholder="请输入折扣比例%"
                       th:value="${source?.discount}">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" name="remark">[[${source?.remark}]]</textarea>
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>